/* Vue 待办事项管理应用样式 */

:root {
  --primary-color: #3498db;
  --secondary-color: #e91e63;
  --success-color: #27ae60;
  --warning-color: #f39c12;
  --danger-color: #e74c3c;
  --dark-bg: #2c3e50;
  --card-bg: #34495e;
  --text-primary: #ecf0f1;
  --text-secondary: #bdc3c7;
  --text-muted: #7f8c8d;
  --border-color: #4a5f7a;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --task-bg: rgba(52, 73, 94, 0.8);
  --task-bg-hover: rgba(52, 73, 94, 0.95);
  --task-border: #34495e;
  --task-completed-bg: rgba(39, 174, 96, 0.15);
  --task-shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* 深色主题 (默认) */
.dark-theme {
  --primary-color: #3498db;
  --secondary-color: #e91e63;
  --success-color: #27ae60;
  --warning-color: #f39c12;
  --danger-color: #e74c3c;
  --dark-bg: #2c3e50;
  --card-bg: #34495e;
  --text-primary: #ecf0f1;
  --text-secondary: #bdc3c7;
  --text-muted: #7f8c8d;
  --border-color: #4a5f7a;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --task-bg: rgba(52, 73, 94, 0.8);
  --task-bg-hover: rgba(52, 73, 94, 0.95);
  --task-border: #34495e;
  --task-completed-bg: rgba(39, 174, 96, 0.15);
  --task-shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* 浅色主题 */
.light-theme {
  --primary-color: #2980b9;
  --secondary-color: #e74c3c;
  --success-color: #27ae60;
  --warning-color: #f39c12;
  --danger-color: #c0392b;
  --dark-bg: #f8f9fa;
  --card-bg: #ffffff;
  --text-primary: #2c3e50;
  --text-secondary: #34495e;
  --text-muted: #7f8c8d;
  --border-color: #e9ecef;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --task-bg: rgba(255, 255, 255, 0.9);
  --task-bg-hover: rgba(248, 249, 250, 1);
  --task-border: #e9ecef;
  --task-completed-bg: rgba(39, 174, 96, 0.1);
  --task-shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* 蓝色主题 */
.blue-theme {
  --primary-color: #1e3a8a;
  --secondary-color: #3b82f6;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --dark-bg: #eff6ff;
  --card-bg: #dbeafe;
  --text-primary: #1e3a8a;
  --text-secondary: #3730a3;
  --text-muted: #6b7280;
  --border-color: #93c5fd;
  --shadow: 0 4px 6px rgba(59, 130, 246, 0.1);
  --task-bg: rgba(219, 234, 254, 0.8);
  --task-bg-hover: rgba(191, 219, 254, 0.9);
  --task-border: #93c5fd;
  --task-completed-bg: rgba(16, 185, 129, 0.1);
  --task-shadow-hover: 0 10px 30px rgba(59, 130, 246, 0.2);
}

/* 绿色主题 */
.green-theme {
  --primary-color: #065f46;
  --secondary-color: #10b981;
  --success-color: #059669;
  --warning-color: #d97706;
  --danger-color: #dc2626;
  --dark-bg: #ecfdf5;
  --card-bg: #d1fae5;
  --text-primary: #065f46;
  --text-secondary: #047857;
  --text-muted: #6b7280;
  --border-color: #86efac;
  --shadow: 0 4px 6px rgba(16, 185, 129, 0.1);
  --task-bg: rgba(209, 250, 229, 0.8);
  --task-bg-hover: rgba(167, 243, 208, 0.9);
  --task-border: #86efac;
  --task-completed-bg: rgba(5, 150, 105, 0.1);
  --task-shadow-hover: 0 10px 30px rgba(16, 185, 129, 0.2);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--dark-bg);
  color: var(--text-primary);
  line-height: 1.6;
}

.container {
  max-width: 700px;
  margin: 0 auto;
  background: var(--card-bg);
  min-height: 100vh;
  padding: 20px;
  box-shadow: var(--shadow);
}

@media (max-width: 768px) {
  .container {
    padding: 15px;
  }
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
  position: relative;
}

.app-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--primary-color);
}

.header-left {
  flex: 1;
}

.app-title {
  font-size: 2em;
  margin: 0 0 15px 0;
  color: var(--text-primary);
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.user-greeting {
  font-size: 0.95em;
  color: var(--text-secondary);
  line-height: 1.6;
}

.greeting-text {
  display: block;
}

.highlight {
  color: var(--warning-color);
  font-weight: 600;
  padding: 2px 6px;
  background: rgba(243, 156, 18, 0.1);
  border-radius: 4px;
}

.header-right {
  margin-left: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.theme-switcher {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.theme-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.theme-options {
  display: flex;
  gap: 8px;
  padding: 4px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.theme-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  position: relative;
  overflow: hidden;
}

.theme-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.theme-btn.active {
  transform: scale(1.15);
  box-shadow: 0 0 0 2px var(--text-primary);
}

.theme-btn.active::after {
  content: '';
  position: absolute;
  top: 2px;
  right: 2px;
  width: 6px;
  height: 6px;
  background: var(--text-primary);
  border-radius: 50%;
}

.user-avatar {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.user-avatar:hover {
  transform: scale(1.05);
}

.avatar-icon {
  width: 28px;
  height: 28px;
  color: white;
}

.input-section {
  margin-bottom: 30px;
}

.input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.task-input {
  flex: 1;
  padding: 14px 20px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  background: var(--dark-bg);
  color: var(--text-primary);
  transition: var(--transition);
}

.task-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.task-input::placeholder {
  color: var(--text-muted);
}

.add-btn {
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--secondary-color), #c2185b);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
  min-width: 80px;
}

.add-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(233, 30, 99, 0.3);
}

.add-btn:active:not(:disabled) {
  transform: translateY(0);
}

.add-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.priority-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.priority-options {
  display: flex;
  gap: 20px;
}

.priority-option {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.priority-option input[type='radio'] {
  display: none;
}

.priority-label {
  color: #bdc3c7;
  font-size: 14px;
  transition: color 0.3s ease;
}

.priority-option input[type='radio']:checked + .priority-label {
  color: var(--primary-color);
  font-weight: 600;
}

.priority-display {
  color: #bdc3c7;
  font-size: 14px;
}

.task-list-header {
  margin-bottom: 20px;
}

.task-list-header h3 {
  margin: 0;
  color: #ecf0f1;
  font-size: 1.2em;
}

.task-list {
  space-y: 10px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  background: rgba(52, 73, 94, 0.3);
  border-radius: 12px;
  border: 2px dashed var(--border-color);
  animation: fadeIn 0.5s ease;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.7;
  animation: bounce 2s infinite;
}

.empty-text {
  font-size: 18px;
  margin: 0;
  font-weight: 500;
}

.edit-input {
  width: 100%;
  padding: 8px 12px;
  border: 2px solid var(--primary-color);
  border-radius: 6px;
  font-size: 14px;
  background: var(--dark-bg);
  color: var(--text-primary);
  margin-bottom: 8px;
}

.edit-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.edit-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.task-item {
  background: var(--task-bg);
  border: 1px solid var(--task-border);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.task-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary-color);
  opacity: 0;
  transition: var(--transition);
}

.task-item:hover {
  background: var(--task-bg-hover);
  border-color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: var(--task-shadow-hover);
}

.task-item:hover::before {
  opacity: 1;
}

.task-item.completed {
  opacity: 0.8;
  background: var(--task-completed-bg);
  border-color: var(--success-color);
}

.task-item.completed::before {
  background: var(--success-color);
  opacity: 1;
}

.task-item.priority-high::before {
  background: var(--danger-color);
  opacity: 1;
}

.task-content {
  display: flex;
  align-items: center;
  flex: 1;
}

.task-priority-indicator {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-right: 12px;
  flex-shrink: 0;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.task-priority-indicator:hover {
  transform: scale(1.1);
  background: rgba(52, 73, 94, 0.5);
}

.priority-重要 {
  color: var(--danger-color);
}

.priority-一般 {
  color: var(--primary-color);
}

.priority-低 {
  color: #95a5a6;
}

.task-info {
  flex: 1;
}

.task-text {
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.5;
  font-weight: 500;
  margin-bottom: 4px;
}

.task-text.completed-text {
  text-decoration: line-through;
  color: var(--text-muted);
  opacity: 0.8;
}

.task-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.task-priority {
  background: rgba(52, 73, 94, 0.5);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}

.task-date {
  font-style: italic;
}

.task-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  min-width: 60px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.edit-btn {
  background: #9b59b6;
  color: white;
}

.edit-btn:hover {
  background: #8e44ad;
  transform: translateY(-1px);
}

.delete-btn {
  background: var(--danger-color);
  color: white;
}

.delete-btn:hover {
  background: #c0392b;
  transform: translateY(-1px);
}

.save-btn {
  background: var(--success-color);
  color: white;
}

.save-btn:hover {
  background: #219a52;
}

.cancel-btn {
  background: var(--text-muted);
  color: white;
}

.cancel-btn:hover {
  background: #6c7b7f;
}

.action-btn:active {
  transform: translateY(0);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .app-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .header-right {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
  }

  .theme-switcher {
    flex-direction: row;
    gap: 12px;
  }

  .theme-label {
    font-size: 14px;
  }

  .theme-options {
    gap: 6px;
  }

  .theme-btn {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  .user-avatar {
    width: 50px;
    height: 50px;
  }

  .avatar-icon {
    width: 24px;
    height: 24px;
  }

  .user-greeting {
    margin-top: 8px;
  }

  .greeting-text {
    font-size: 14px;
  }

  .input-group {
    flex-direction: column;
    gap: 15px;
  }

  .add-btn {
    width: 100%;
  }

  .priority-options {
    justify-content: center;
  }

  .task-item {
    padding: 15px;
  }

  .task-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .task-actions {
    width: 100%;
    justify-content: flex-end;
  }
}